
<div id="bd">
    <div class="wrap clearfix">
        <div class="sidebar">
            <h2 class="sidebar-header"><p>功能导航</p></h2>
            <ul class="nav" style="height:650px">
                <li class="office">
                    <div class="nav-header">
                        <a href="{:U('Index/index')}" data-src="{:U('Index/index')}" class="clearfix" style="background: url(/Public/Index/img/ico01.png) no-repeat left center;">
                            <span>系统首页</span>
                        </a>
                    </div>
                </li>
                <foreach name="extra_menu" key="key" item="menu">
                    <li class="office">
                        <div class="nav-header">
                            <if condition="$menu[child] neq null">
                                <a data-src="{$menu.url}" class="clearfix" style="background: url(/Public/Index/img/ico0{$key+2}.png) no-repeat left center;">
                                    <span>{$menu.name}</span>
                                    <i class="icon"></i>
                                </a>
                                <else/>
                                <a href="{$menu.url}{$menu.param}" data-src="{$menu.url}" class="clearfix" style="background: url(/Public/Index/img/ico0{$key+2}.png) no-repeat left center;">
                                    <span>{$menu.name}</span>
                                </a>
                            </if>
                        </div>
                    </li>
                    <notempty name="menu['child']">
                        <ul class='nav nav-child' style="padding-left:20px;border:0;">
                            <foreach name='menu.child' item='child'>
                                <li class="office office1">
                                    <div class="nav-header c_{$key}">
                                        <a href="{$child.url}{$child.param}" data-src="{$child.url}" class="clearfix clearfix1" style="background: url(/Public/Index/img/ico0{$key+2}.png) no-repeat left center;">
                                            <span class='c_{$child.id}'>{$child.name}</span>
                                            <input type="hidden" class="c_{$child.id}">
                                        </a>
                                    </div>
                                </li> 

								<script type="text/javascript">
									var url= window.location.href;
									var index = url.substring(url.lastIndexOf('/') + 1);
									var current_tag = $(".c_{$child.id}").val();
									if(index == current_tag){
										$(".{$child.id}").css('color','#fff');
										$(".c_{$key}").css('background','url(/Public/Index/img/ico0{$key+2}.png) no-repeat left center #6AB96E');
										$(".{$child.id}").css('width','95px');
									}

								</script>
                            </foreach>
                        </ul>
                    </notempty>
                </foreach>
            </ul>
        </div>


